package com.devmindset.legoframework.usage.server.service;

import java.util.List;

import com.devmindset.legoframework.usage.client.model.CalEvent;
import com.devmindset.legoframework.usage.client.model.Country;
import com.devmindset.legoframework.usage.client.model.OrderItem;
import com.devmindset.legoframework.usage.client.service.UsageServiceInterface;
import com.devmindset.legoframework.usage.server.data.CalEventData;
import com.devmindset.legoframework.usage.server.data.CountryData;
import com.devmindset.legoframework.usage.server.data.OrderItemData;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * Server-side implementation of {@link UsageServiceInterface}.
 * 
 * @author <a href="ice.penov@devmindset.com">Ice Penov</a>
 */
public class UsageServiceImpl extends RemoteServiceServlet implements UsageServiceInterface {
	
	private static final long serialVersionUID = -1166756427014508766L;

	/** {@inheritDoc} */
	public String ping() {
		return "OK";
	}
	
	/** {@inheritDoc} */
	public List<Country> getCountries() {
		return CountryData.getRecords();
	}
	
	/** {@inheritDoc} */
	public List<OrderItem> getOrderItems() {
		return OrderItemData.getRecords();
	}
	
	/** {@inheritDoc} */
	public List<CalEvent> getCalendarEvents() {
		return CalEventData.getRecords();
	}
	
}